void rainbowonelinefast() {
int dif = 20;
  rainbowoneline(dif);
}

void rainbowonelineslow() {
int dif = 10;
  rainbowoneline(dif);
}

void rainbowtogetherfast() {
int dif = 20;
  rainbowtogether(dif);
}

void rainbowtogetherslow() {
int dif = 10;
  rainbowtogether(dif);
}

void rainbowoneline(int dif) {
static int r = 255, g = 0,b = 0;
static int phase = 0;
  switch (phase) {
    case 0:
      r -= dif;
      g += dif;
      if (r <= 0) {
        r = 0;
        g = 255;
        phase = 1;
      }
      break;
    case 1:
      g -= dif;
      b += dif;
      if (g <= 0) {
        g = 0;
        b = 255;
        phase = 2;
      }
      break;
    case 2:
      b -= dif;
      r += dif;
      if (b <= 0) {
        b = 0;
        r = 255;
        phase = 0;
      }
      break;
  }
  leds[0] = CRGB(r,g,b);
  FastLED.show();
  wholeshift();
  delay(50);
  
}

void rainbowtogether(int dif) {
static int r = 255, g = 0,b = 0;
static int phase = 0;
  switch (phase) {
    case 0:
      r -= dif;
      g += dif;
      if (r <= 0) {
        r = 0;
        g = 255;
        phase = 1;
      }
      break;
    case 1:
      g -= dif;
      b += dif;
      if (g <= 0) {
        g = 0;
        b = 255;
        phase = 2;
      }
      break;
    case 2:
      b -= dif;
      r += dif;
      if (b <= 0) {
        b = 0;
        r = 255;
        phase = 0;
      }
      break;
  }
  leds[0] = CRGB(r,g,b);
  leds[24] = CRGB(r,g,b);
  leds[48] = CRGB(r,g,b);
  leds[72] = CRGB(r,g,b);
  leds[96] = CRGB(r,g,b);
  FastLED.show();
  eachlineshift();
  delay(50);
}

